package back_end;

import java.sql.Connection;
//import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

class MysqlConnection {
    private static Connection conn;
    MysqlConnection() throws Exception {
        Class.forName("com.mysql.cj.jdbc.Driver");
        conn = DriverManager.getConnection("jdbc:mysql://www.bogo.ac.cn/trndb", "user01", "User01");
    }
    protected static Boolean getStatus() throws SQLException {
        return conn != null && !conn.isClosed();
    }
    protected static Connection getConn() {
        return conn;
    }
}
